import { MockMethod } from 'vite-plugin-mock';
import { resultSuccess } from '../_util';

const sipList = (() => {
  const result: any[] = [];
  for (let index = 0; index < 10; index++) {
    result.push({
      deviceId: `${100000 + index + 1}`,
      channelId: `${100000 + index + 1}`,
      status: Math.random() > 0.5 ? '离线' : '未使用',
      product: index % 2 === 0 ? '★海康监控产品' : '测试海康视频',
      deviceType: index % 2 === 0 ? '摄像机' : 'IPC',
      channelType: index % 2 === 0 ? '摄像机' : 'IPC',
      region: `省份/城市/区域${index + 1}`,
      registrationTime: index % 2 === 0 ? '@datetime' : '',
    });
  }
  return result;
})();
export default [
  {
    url: '/basic-api/video/getSipList',
    timeout: 100,
    method: 'get',
    response: () => {
      return resultSuccess(sipList);
    },
  },
] as MockMethod[];
